﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;

namespace BCMS.Forms.Report
{
    public partial class frmReport : Form
    {
        public rptReleaseInfo Rls { set; get; }

        public frmReport()
        {
            InitializeComponent();
        }

        public frmReport(rptReleaseInfo _rls, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = _rls;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponExpireDetail expireDetailReport, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = expireDetailReport;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponByClaim claimReport, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = claimReport;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponClaimByUser claimByUser, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = claimByUser;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponExpired byExpired, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = byExpired;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponUnExpired byUnExpired, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = byUnExpired;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

        public frmReport(rptCouponByReleaseDate byReleaseDate, ParameterFields parms)
        {
            try
            {
                this.Font = SystemFonts.MessageBoxFont;
                InitializeComponent();
                crViewer.ParameterFieldInfo = parms;
                crViewer.ReportSource = byReleaseDate;
            }
            catch
            {
                MessageBox.Show("Report exception", "Oops!");
                return;
            }
        }

    }
}
